<div class="seed-goods-spec seed-goods-purchase-warp seed-flexbox seed-flexbox-column">
  <div class="goods-close-btn" (click)="closeModal()">
    <button></button>
  </div>
  <seed-item class="goods-purchase-header seed-flexbox seed-flexbox-align-center seed-underline">
    <div class="goods-preview-pic" *ngIf="goods.imgList" [style.background-image]="'url('+goods.imgList[0]?.goodsMiddleUrl+')'"></div>
    <div class="goods-selected-box">
      <div class="goods-selected-price" *ngIf="goodsPrice != null">
        ￥{{goodsPrice | money}}
      </div>
      <div class="class-goods-selected-spec" *ngIf="selectedSore['attrsName'].length == 0">请选择商品规格</div>
      <div class="class-goods-selected-spec" *ngIf="selectedSore['attrsName'].length > 0">已选：{{selectedSore['attrsName'].join(' ')}}</div>
    </div>

  </seed-item>

  <div class="goods-purchase-content">
    <seed-goods-spec-item *ngFor="let item of goods.attributeList,let idx = index"
                          [goodsAttributes]="item"
                          [goods]="goods"
                          [row]="idx"
                          [attr.data-row]="idx"
                          (onSelected)="handleSelectedItem($event)"
    >
    </seed-goods-spec-item>

    <div class="goods-part goods-inventory seed-underline">
      库存：{{selectedSore['goodsStock']}}
    </div>
    <div class="goods-part goods-count-box seed-underline seed-flexbox seed-flexbox-content-between seed-flexbox-align-center">
      <span>购买数量</span>
      <seed-counter [max]="selectedSore['buyTimesLimit']" (onSelected)="handleSelectedQuantity($event)"></seed-counter>
    </div>
  </div>

  <div class="goods-purchase-btn static" (click)="handleConfirm()">
    <button class="opacity" [disabled]="isDisabled">提交</button>
  </div>
</div>
